<?php
include("../inc/global.inc");
include("../inc/fun.php");
include("../steps.php");
if($_POST[act]){
$jobid=$_POST[jobid]?$_POST[jobid]:0;

@mysql_query("insert into job_mailbox (from_id,to_id,job_id,box_title,box_text,box_addtime) values ('$_POST[fromid]','$_POST[toid]','$jobid','$_POST[box_title]','$_POST[box_text]','".date("Y-m-d H:i:s")."')");

echo "<script>alert('发送成功');location='".$_POST['urls']."';</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>回复邮件-三帝招聘网</title>
</head>
<style type="text/css">
<!--
.ta {
	font-size: 12px;
	color: #333333;
	border: 1px solid #ECE9D8;
}
.picbutt {
	background-image: url(images/70.gif);
	display: block;
	height: 21px;
	width: 83px;
	line-height: 21px;
	text-align: center;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
}
.ta td {
	padding-left: 5px;
}
-->
</style>
<body>
<form id="form1" name="form1" method="post" action="" onsubmit="return checkform()">
<input type="hidden" name="fromid" value="<?=$_GET[fromid]?>" />
<input type="hidden" name="toid" value="<?=$_GET[toid]?>" />
<input type="hidden" name="jobid" value="<?=($_GET[jobid]?$_GET[jobid]:0)?>" />
  <table width="721" height="74" border="0" align="center" cellpadding="0" cellspacing="1" class="ta">
    <tr>
      <td height="70" colspan="2" align="center" background="images/send1.gif"><h3>回复邮件</h3></td>
    </tr>
  </table>
  <table width="721" height="279" border="0" align="center" cellpadding="0" cellspacing="1" class="ta">
    <tr>
      <td width="102" height="26" align="center" bgcolor="#EBEBEA">信件标题：</td>
      <td width="614" bgcolor="#FFFFFF"><label>
        <input name="box_title" type="text" id="box_title" size="40" maxlength="100" value="<?=$_GET[channel]?>" />
      </label></td>
    </tr>
    <tr>
      <td align="center" valign="top" bgcolor="#EBEBEA">内　　容：</td>
      <td valign="top" bgcolor="#FFFFFF" style="line-height:22px;padding:5px;"><label><textarea name="box_text" id="box_text" cols="70" rows="15"></textarea><br />
      </label></td>
    </tr>
    <tr>
      <td height="36" align="center" bgcolor="#FAFAFA"><label></label></td>
      <td height="36" align="center" bgcolor="#FAFAFA"><table width="100" border="0" align="center" cellpadding="0" cellspacing="5">
        <tr><input type="hidden" name="act" value="job.sandib2b.cn" />
		    <input type="hidden" name="urls" value="<?=$_SERVER['HTTP_REFERER']?>" />
          <td><input type="submit" class="picbutt" value=" 发 送 " /></td>
        </tr>
      </table></td>
    </tr>
  </table>
</form>
</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkform(){
if($("box_title").value==""){
alert("信件标题不能为空");
$("box_title").focus();
return false;
}
if($("box_text").value==""){
alert("内容不能为空");
$("box_text").focus();
return false;
}
}
</script>